﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    <style type="text/css">
        * {
            font-family: microsoft yahei;
            font-size: 12px;
            margin:0;
            padding:0;
        }


    </style>
    <link href="/EasyUI/themes/default/easyui.css" rel="stylesheet" />
    <link href="/Content/Site.css" rel="stylesheet" />
    <link href="/MsgBox/jquery.msgbox.css" rel="stylesheet" />
    <link href="/Easyui/themes/icon.css" rel="stylesheet" />
    <script src="/Scripts/jquery-1.8.2.min.js"></script>
    <script src="/Easyui/jquery.easyui.min.js"></script>
    @*<script src="~/MsgBox/jquery.easyui.min.js"></script>*@
    <script src="/MsgBox/jquery.msgbox.js"></script>
    <script src="/Scripts/jquery.msgProcess.js"></script>
    <script src="/Easyui/easyui-lang-zh_CN.js"></script>
    <script src="/Scripts/jquery.validate.min.js"></script>
    <script src="/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script src="/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script src="/Scripts/jquery.globalHelper.js"></script>
@*    <script src="/EasyUI/datagrid-filter.js"></script>*@
    @*<script src="/lhgdialog/lhgdialog.min.js"></script>*@
    @RenderSection("headSecion", required: false)
    <script type="text/javascript">
        $(document).ready(function () {
            //禁止退格键 作用于Firefox、Opera
            document.onkeypress = banBackSpace;
            //禁止退格键 作用于IE、Chrome
            document.onkeydown = banBackSpace;
        });
        //处理键盘事件 禁止后退键（Backspace）密码或单行、多行文本框除外
        function banBackSpace(e) {
            //alert(event.keyCode)
            var ev = e || window.event;//获取event对象
            var obj = ev.target || ev.srcElement;//获取事件源
            var t = obj.type || obj.getAttribute('type');//获取事件源类型
            //获取作为判断条件的事件类型
            var vReadOnly = obj.readOnly;
            var vDisabled = obj.disabled;
            //处理undefined值情况
            vReadOnly = (vReadOnly == undefined) ? false : vReadOnly;
            vDisabled = (vDisabled == undefined) ? true : vDisabled;
            //当敲Backspace键时，事件源类型为密码或单行、多行文本的，
            //并且readOnly属性为true或disabled属性为true的，则退格键失效
            var flag1 = ev.keyCode == 8 && (t == "password" || t == "text" || t == "textarea") && (vReadOnly == true || vDisabled == true);
            //当敲Backspace键时，事件源类型非密码或单行、多行文本的，则退格键失效
            var flag2 = ev.keyCode == 8 && t != "password" && t != "text" && t != "textarea";
            //判断
            if (flag2 || flag1)
                //event.returnValue = false;//这里如果写 return false 无法实现效果
                 return false;//ie11下有效 谷歌有效
        }

    </script>

</head>
<body>
    @RenderBody()
</body>
</html>
